package com.joven.shelltest.controller;

import com.joven.shelltest.dto.SignQueryDto;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author wzj
 * @Date 2023-11-23 09:02
 **/
@RestController
@RequiredArgsConstructor
@RequestMapping("/openapi")
public class ApiController {

    @PostMapping("/testSign")
    public String testSign(@RequestBody SignQueryDto form) {
        if ("Joven".equals(form.getData())) {
            return "Hello:" + form.getData() + " >>";
        }
        return "ERROR";
    }
}
